package com.ygq.train.batch.openfeign;

import com.ygq.train.common.resp.CommonResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;

//可以跨模块调用其接口

@FeignClient(value = "business", fallback = BusinessFeignFallback.class)
//@FeignClient(name= "business",url = "http://127.0.0.1:8001/business")
public interface BusinessOpenFeign {

    @GetMapping("/test")
    String test();

    @GetMapping("/admin/dailyTrain/gen-daily/{date}")
    CommonResp<Object> genDaily(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd")Date date);
}
